<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
function getRobotAnswer(userid, text) {
	$.ajax({
		type: "post",
		//url: 'http://ibotcluster.online.uairobot.com/robot/app/bjhg/ask.action',
		url: 'http://223.71.57.70:10000/robot/app/hdgsfj/ask.action',
		data: {
			question: text,
			userId: userid,
			platform: 'web',
			format: 'json',
		},
		dataType: "jsonp", //数据格式设置为jsonp
		jsonp: "callback", //Jquery生成验证参数的名称
		success: function(data) {
			alert(JSON.stringify(data));
		},
		error: function() {
			alert("failed");
		}
	});
}
</script>
</head>

<body>
<input type="button" value="问" onclick="getRobotAnswer('litong','今天天气怎么样')" />
</body>

</html>